home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / util / cli / SetDTool.lha / SetDTool / SetDTool.s < prev    next >
Text File  |  2000-12-05  |  17KB  |  583 lines

  1. *****************************************************************************
  2. *                                        *
  3. *    PROGRAM: SetDTool                            *
  4. *    VERSION: 1.3                                *
  5. *   SOURCE CODE: 14                                *
  6. *       DATE: 13.8.2000                            *
  7. *      LANGUAGE: Assembler (DevPac V3.14)                    *
  8. *     SYSTEM: A1200    KS 40.68 WB 40.42 2MB chip 64MB fast 68030/50mhz    *
  9. *                                        *
  10. *     AUTHOR: Joerg Riemer 14167 Berlin/SchottmuellerStr.107/Germany        *
  11. *      EMAIL: mission@cs.tu-berlin.de                    *
  12. *                                        *
  13. *    COMMENT: cli-command to change the defaulttool entry            *
  14. *         defined in project-icons.                    *
  15. *                                        *
  16. *      TEMPLATE: FILE,TOOL/K,LIST/S,ALL/S,QUIET/S                *
  17. *                                        *
  18. *     OPTION: To get a shorter file, set BSS_Section to NULL and use        *
  19. *         StripHunk instead to generate a Code_BSS-segment. it        *
  20. *         spares some bytes! but for anybody don't know what        *
  21. *         this means: "leave it as it is"                *
  22. *                                         *
  23. *         StripHunk is available at AmiNet dev/misc/...            *
  24. *                                        *
  25. *         for suggestions, hints/tips, and/or questions            *
  26. *         send an email to: mission@cs.tu-berlin.de            *
  27. *                                        *
  28. *****************************************************************************
  29.  
  30. *        opt    d+
  31.  
  32. BSS_Section    set    1
  33.  
  34. *****************************************************************************
  35.  
  36.     output    ram:SetDTool
  37.  
  38. ************************************************ exec definitions ***********
  39.  
  40. _LVOOpenLibrary        equ    -552
  41. _LVOCloseLibrary    equ    -414
  42.  
  43. ************************************************ dos definitions ************
  44.  
  45. _LVOOutput        equ    -060
  46. _LVOIoErr        equ    -132
  47. _LVOFPutC        equ    -312
  48. _LVOFPuts        equ    -342
  49. _LVOSetIoErr        equ    -462
  50. _LVOPrintFault        equ    -474
  51. _LVOReadArgs        equ    -798
  52. _LVOFreeArgs        equ    -858
  53. _LVOMatchFirst        equ    -822
  54. _LVOMatchNext        equ    -828
  55. _LVOMatchEnd        equ    -834
  56.  
  57. ap_BreakBits        equ    $008
  58. ap_Flags        equ    $010
  59. ap_Strlen        equ    $012
  60. ap_Info            equ    $014
  61.  
  62. fib_DirEntryType    equ    $004
  63.  
  64. APB_DOWILD        equ    $000
  65. APB_DODIR        equ    $002
  66. APB_DIDDIR        equ    $003
  67.  
  68. SIGBREAKB_CTRL_C    equ    $00C
  69. SIGBREAKB_CTRL_D    equ    $00D
  70. SIGBREAKB_CTRL_E    equ    $00E
  71. SIGBREAKB_CTRL_F    equ    $00F
  72.  
  73. ************************************************ icon definitions ***********
  74.  
  75. _LVOGetDiskObject    equ    -078
  76. _LVOPutDiskObject    equ    -084
  77. _LVOFreeDiskObject    equ    -090
  78.  
  79. WBPROJECT        equ    $004
  80. do_Type            equ    $030
  81. do_DefaultTool        equ    $032
  82.  
  83. ************************************************ bss datas ******************
  84.  
  85. Anchorpath    rs.b    280            ;size_of anchorpath
  86. PNameOrg    rs.b    256            ;size_of ap_strlen (pathname)
  87. PNameBuf    rs.b    256            ;size_of workbuffer
  88. DOSBase        rs.l    1            ;ptr. base of library
  89. ICOBase        rs.l    1            ;ptr. base of library
  90.  
  91. Filename    rs.l    1            ;argarray ptr. filename
  92. Tool        rs.l    1            ;argarray ptr. newtoolstring
  93. List        rs.l    1            ;argarray flag (list only)
  94. All        rs.l    1            ;argarray flag (do subdirs)
  95. Quiet        rs.b    1            ;argarray flag (no output)
  96. EntryType    rs.b    1            ;flag (found #?.info)
  97. Flag3        rs.b    1            ;pad
  98. Flag4        rs.b    1            ;pad
  99.  
  100. RDArgs        rs.l    1            ;ptr. rdargs structure
  101. RCode1        rs.l    1            ;errorcode > rc
  102. RCode2        rs.l    1            ;errorcode > result2
  103. MatchReturn    rs.l    1            ;errorcode (matchnext)
  104. DObject        rs.l    1            ;ptr. workbench diskobject
  105. DefTool        rs.l    1            ;ptr. do_defaulttool
  106. FCount        rs.l    1            ;counter (files proccessed)
  107. StrEnd        rs.l    1            ;ptr. stringend w/o ".info"
  108.  
  109. BSS_Size    rs.b    0            ;bss_size over all
  110.  
  111. *****************************************************************************
  112.  
  113. Start        movem.l    D1-D7/A0-A6,-(SP)    ;save registers
  114.  
  115.         if    BSS_Section        ;check assembler condition
  116.  
  117.         movea.l    Start-4(pc),A5        ;get bss_section
  118.         addq.l    #1,A5            ;skip pointer (next segment)
  119.         adda.l    A5,A5            ;convert bpcl_pointer
  120.         adda.l    A5,A5            ;to real_address
  121.  
  122.         elseif                ;otherwise
  123.  
  124.         lea    DataBase(pc),A5        ;set working area
  125.  
  126.         endc                ;end condition
  127.  
  128. ************************************************ open libraries *************
  129.  
  130.         moveq    #20,D0            ;failat level
  131.         move.l    D0,RCode1(A5)        ;preset error (no library)
  132.  
  133.         movea.l    4.w,A6            ;set EXEC to call a function
  134.  
  135.         moveq    #37,D0            ;required library version
  136.         lea    DOSName(pc),A1        ;set library name
  137.         jsr    _LVOOpenLibrary(A6)    ;use EXEC to (openlibrary)
  138.         move.l    D0,DOSBase(A5)        ;save base
  139.  
  140.         beq.b    CloseLibs        ;branch if not open
  141.  
  142.         moveq    #37,D0            ;required library version
  143.         lea    ICOName(pc),A1        ;set library name
  144.         jsr    _LVOOpenLibrary(A6)    ;use EXEC to (openlibrary)
  145.         move.l    D0,ICOBase(A5)        ;save base
  146.  
  147.         beq.b    CloseLibs        ;branch if not open
  148.  
  149. *****************************************************************************
  150.  
  151.         bsr.b    Main
  152.  
  153. ************************************************ close libraries ************
  154.  
  155. CloseLibs    movea.l    4.w,A6            ;set EXEC to call a function
  156.  
  157.         move.l    ICOBase(A5),D1        ;get base_ptr
  158.         beq.b    CloseDOS        ;branch when not open
  159.         movea.l    D1,A1            ;set base_ptr
  160.         jsr    _LVOCloseLibrary(A6)    ;use EXEC to (closelibrary)
  161.  
  162. CloseDOS    move.l    DOSBase(A5),D1        ;get base_ptr
  163.         beq.b    ExitDOS            ;branch when not open
  164.         movea.l    D1,A1            ;set base_ptr
  165.         jsr    _LVOCloseLibrary(A6)    ;use EXEC to (closelibrary)
  166.  
  167. ExitDOS        move.l    RCode1(A5),D0        ;set returncode
  168.         movem.l    (SP)+,D1-D7/A0-A6    ;restore registers
  169.         rts                ;go back (shell)
  170.  
  171. *****************************************************************************
  172.  
  173. DOSName        dc.b    "dos.library",0
  174. ICOName        dc.b    "icon.library",0
  175.  
  176. *****************************************************************************
  177.  
  178. version    dc.b "$VER: SetDTool 1.3 14 (13.8.00) by joerg riemer mar'00",0
  179.  
  180. *****************************************************************************
  181.  
  182.         cnop    0,4
  183.  
  184. *****************************************************************************
  185.  
  186. Main        clr.l    RCode1(A5)        ;clear returncode
  187.  
  188.         bsr    ReadArgs        ;read user_arguments
  189.         bsr    CheckArgs        ;check for legal arguments
  190.  
  191.         bsr    InitAPath        ;prepare anchorpath
  192.         bsr    MatchFirst        ;search for filename
  193.  
  194. Loop        bsr    CheckEntryType        ;check for dir/file
  195.         bsr    MatchNext        ;do matchnext first!!
  196.         bsr.b    SetDTool        ;then edit prematched file
  197.  
  198. Next        move.l    MatchReturn(A5),D1    ;check returncode (matchnext)
  199.         beq.b    Loop            ;loop again when ok
  200.  
  201.         cmp.w    #232,D1            ;check for 'no more entries'
  202.         bne    Error4            ;branch if not
  203.  
  204.         move.l    #205,D1            ;preset "file not found"
  205.         tst.l    FCount(A5)        ;found some files?
  206.         beq    Error4            ;branch if not
  207.  
  208.         move.l    RCode2(A5),D1        ;check returncode2
  209.         beq.b    Quit0            ;branch if not set
  210.  
  211.         movea.l    DOSBase(A5),A6        ;set dos_base
  212.         jsr    _LVOSetIoErr(A6)    ;use dos to set pr_result2
  213.  
  214. Quit0        bsr    MatchEnd        ;free memory (anchorpath)
  215. Quit1        bsr    FreeArgs        ;free memory (readargs)
  216.         rts                ;go back
  217.  
  218. *****************************************************************************
  219.  
  220.         cnop    0,4
  221.  
  222. ************************************************ set default tool ***********
  223.  
  224. SetDTool    tst.b    EntryType(A5)        ;found a info_file?
  225.         beq    .Ready            ;branch if not
  226.  
  227. *********************** read [#?.info] file ****
  228.  
  229.         move.l    StrEnd(A5),A2        ;remove suffix [.info]
  230.         clr.b    (A2)            ;remove suffix [.info]
  231.  
  232.         lea    PNameBuf(A5),A0        ;set filename
  233.         move.l    ICOBase(A5),A6        ;set library_base
  234.         jsr    _LVOGetDiskObject(A6)    ;use icon to getdiskobject
  235.         move.l    D0,DObject(A5)        ;got it?
  236.         beq    Error2            ;branch if not
  237.  
  238. *********************** check for project.info *
  239.  
  240.         move.l    D0,A0            ;set diskobject
  241.         cmp.b    #WBPROJECT,do_Type(A0)    ;check for project_icon
  242.         bne.b    .FreeDObject        ;branch if not
  243.  
  244. *********************** set new defaulttool ****
  245.  
  246.         addq.l    #1,FCount(A5)        ;inc. files proccessed
  247.  
  248.         tst.b    List(A5)        ;list file only ?
  249.         bne.b    .PrintFName        ;branch if so
  250.  
  251.         move.l    do_DefaultTool(A0),DefTool(A5)    ;save old defauft
  252.         move.l    Tool(A5),do_DefaultTool(A0)    ;set new default
  253.  
  254.         movea.l    A0,A1            ;set diskobject
  255.         lea    PNameBuf(A5),A0        ;set name used to put
  256.         jsr    _LVOPutDiskObject(A6)    ;use icon to putdiskobject
  257.         tst.l    D0            ;save file failed?
  258.         beq    Error3            ;branch if so
  259.  
  260.         move.l    DObject(A5),A0            ;get diskobject
  261.         move.l    DefTool(A5),do_DefaultTool(A0)    ;restore deftool
  262.  
  263. *********************** print path/filename ****
  264.  
  265. .PrintFName    tst.b    Quiet(A5)        ;do some output?
  266.         bne.b    .FreeDObject        ;branch if not
  267.  
  268.         move.l    StrEnd(A5),A2        ;restore filename
  269.         move.b    #".",(A2)        ;restore filename
  270.  
  271.         movea.l    DOSBase(A5),A6        ;set dos_base
  272.         jsr    _LVOOutput(A6)        ;search output_handle
  273.  
  274.         move.l    D0,D1            ;set output
  275.         lea    PNameBuf(A5),A2        ;get filename to print
  276.         move.l    A2,D2            ;prepare dos_fputs
  277.         jsr    _LVOFPuts(A6)        ;use dos to fputs
  278.  
  279.         tst.b    List(A5)        ;list file only ?
  280.         bne.b    .PrintNLine        ;branch if so
  281.  
  282.         movea.l    DOSBase(A5),A6        ;set dos_base
  283.         jsr    _LVOOutput(A6)        ;search output_handle
  284.         move.l    D0,D1            ;set output
  285.         lea    Text(pc),A2        ;get filename to print
  286.         move.l    A2,D2            ;prepare dos_fputs
  287.         jsr    _LVOFPuts(A6)        ;use dos to fputs
  288.  
  289. .PrintNLine    movea.l    DOSBase(A5),A6        ;set dos_base
  290.         jsr    _LVOOutput(A6)        ;search output_handle
  291.         move.l    D0,D1            ;set output
  292.         moveq    #$A,D2            ;set char. to print
  293.         jsr    _LVOFPutC(A6)        ;use dos to fputc
  294.  
  295. *********************** free icon memory *******
  296.  
  297. .FreeDObject    move.l    DObject(A5),A0        ;get diskobject
  298.         movea.l    ICOBase(A5),A6        ;set icon_base
  299.         jsr    _LVOFreeDiskObject(A6)    ;use icon to freediskobject
  300. .Ready        rts
  301.  
  302. *****************************************************************************
  303.  
  304. Text        dc.b    "  patched!",0
  305.  
  306. *****************************************************************************
  307.  
  308.         cnop    0,4
  309.  
  310. ************************************************ prepare anchorpath *********
  311.  
  312. InitAPath    moveq    #00,D0            ;prepare register
  313.         bset    #SIGBREAKB_CTRL_C,D0    ;do break on <CTRL><C> !!!
  314.         move.l    D0,ap_BreakBits(A5)    ;set bit
  315. *        bset    #APB_DOWILD,ap_Flags(A5)
  316.         move.w    #256,ap_Strlen(A5)    ;set length of string_buffer
  317.         rts                ;go back
  318.  
  319. *****************************************************************************
  320.  
  321.         cnop    0,4
  322.  
  323. ************************************************ matchfirst pattern *********
  324.  
  325. MatchFirst    move.l    Filename(A5),D1        ;get user pattern/file
  326.         bne.b    .GetPattern
  327.  
  328.         lea    Pattern(pc),A2        ;force filename
  329.         move.l    A2,D1            ;and set
  330.  
  331. .GetPattern    lea    Anchorpath(A5),A2    ;get anchorpath
  332.         move.l    A2,D2            ;used for matching
  333.         movea.l    DOSBase(A5),A6        ;set dos_base
  334.         jsr    _LVOMatchFirst(A6)    ;use dos to matchfirst
  335.         move.l    D0,MatchReturn(A5)    ;save returncode
  336.         beq.b    .Ready            ;branch if ok
  337.  
  338.         addq    #4,SP            ;clear return_address
  339.         pea    Next(pc)        ;set new one
  340.  
  341. .Ready        rts                ;go back
  342.  
  343. *****************************************************************************
  344.  
  345. Pattern        dc.b    "#?",0,0        ;filename
  346.  
  347. *****************************************************************************
  348.  
  349.         cnop    0,4
  350.  
  351. ************************************************ matchnext pattern **********
  352.  
  353. MatchNext    tst.l    All(A5)            ;scan subdirectories ?
  354.         beq.b    .MatchNext        ;branch if not
  355.  
  356.         lea    ap_Info(A5),A0        ;get fileinfoblock
  357.         tst.l    fib_DirEntryType(A0)    ;type = file ?
  358.         bmi.b    .MatchNext        ;branch if so
  359.  
  360.         bclr    #APB_DIDDIR,ap_Flags(A5)
  361.         bne.b    .MatchNext
  362.         bset    #APB_DODIR,ap_Flags(A5)
  363.  
  364. .MatchNext    lea    Anchorpath(A5),A1    ;get anchorpath structure
  365.         move.l    A1,D1            ;prepare matchnext
  366.         movea.l    DOSBase(A5),A6        ;set dos_base
  367.         jsr    _LVOMatchNext(A6)    ;use dos to matchnext
  368.         move.l    D0,MatchReturn(A5)    ;save return_code
  369.         rts                ;go back
  370.  
  371. *****************************************************************************
  372.  
  373.         cnop    0,4
  374.  
  375. ************************************************ free memory matchfirst/next
  376.  
  377. MatchEnd    lea    Anchorpath(A5),A1    ;get anchorpath structure
  378.         move.l    A1,D1            ;prepare matchend
  379.         movea.l    DOSBase(A5),A6        ;set dos_base
  380.         jsr    _LVOMatchEnd(A6)    ;use dos to matchend
  381.         rts                ;go back
  382.  
  383. *****************************************************************************
  384.  
  385.         cnop    0,4
  386.  
  387. ************************************************ test for #?.info file ******
  388.  
  389. CheckEntryType    lea    ap_Info(A5),A0        ;get fileinfoblock
  390.         tst.l    fib_DirEntryType(A0)    ;type = file ?
  391.         bpl.b    .Ready            ;branch, type is directory
  392.  
  393.         lea    PNameOrg(A5),A0        ;get filename
  394.         lea    PNameBuf(A5),A1        ;set buffer
  395. .CopyString    move.b    (A0)+,(A1)+        ;copy string
  396.         bne.b    .CopyString        ;until end
  397.  
  398.         subq    #6,A1            ;search for suffix '.info'
  399.         cmp.b    #".",(A1)        ;first test
  400.         bne.b    .Ready            ;branch if fail
  401.  
  402.         move.l    A1,StrEnd(A5)        ;set string_end w/o suffix
  403.         addq    #1,A1            ;skip '.'
  404.         move.b    (A1)+,D0        ;second test, get char
  405.         bset    #5,D0            ;set lowercase
  406.         rol.l    #8,D0            ;make room for next char
  407.         move.b    (A1)+,D0        ;get char
  408.         bset    #5,D0            ;set lowercase
  409.         rol.l    #8,D0            ;make room for next char
  410.         move.b    (A1)+,D0        ;get char
  411.         bset    #5,D0            ;set lowercase
  412.         rol.l    #8,D0            ;make room for next char
  413.         move.b    (A1)+,D0        ;get char
  414.         bset    #5,D0            ;set lowercase
  415.         cmp.l    #"info",D0        ;suffix = '.info' ?
  416.  
  417. .Ready        seq    EntryType(A5)        ;set if so
  418.         rts                ;go back
  419.  
  420. *****************************************************************************
  421.  
  422.         cnop    0,4
  423.  
  424. ************************************************ read arguments *************
  425.  
  426. ReadArgs    lea    Template(pc),A1        ;get template
  427.         lea    Filename(A5),A2        ;get arg_array
  428.         move.l    A1,D1            ;set arg_template
  429.         move.l    A2,D2            ;set array
  430.         moveq    #0,D3            ;set args (unused)
  431.         movea.l    DOSBase(A5),A6        ;set dos_base
  432.         jsr    _LVOReadArgs(A6)    ;use dos to readargs
  433.         move.l    D0,RDArgs(A5)        ;save returncode
  434.         beq    Error1            ;branch on wrong args
  435.         rts                ;else, go back
  436.  
  437. *****************************************************************************
  438.  
  439.         cnop    0,4
  440.  
  441. *****************************************************************************
  442.  
  443. CheckArgs    moveq.    #116,D1            ;errorcode "wrong args..."
  444.         move.l    Filename(A5),D0        ;either the filename
  445.         or.l    All(A5),D0        ;or the flag are required
  446.         beq.b    Error5            ;branch if nothing set
  447.  
  448.         moveq    #118,D1            ;errorcode "to much args..."
  449.         and.l    List(A5),D0        ;check list flag
  450.         bne.b    .CheckTool        ;branch if set
  451.  
  452.         or.l    Tool(A5),D0        ;check for tool
  453.         beq.b    Error5            ;branch if not set
  454.         rts                ;go back
  455.  
  456.         cnop    0,4
  457.  
  458. .CheckTool    and.l    Tool(A5),D0        ;no tool required when list
  459.         bne.b    Error5            ;branch when both set
  460.         or.l    Quiet(A5),D0        ;list and quiet is useless
  461.         bne.b    Error5            ;branch if so
  462.         rts                ;go back
  463.  
  464. *****************************************************************************
  465.  
  466.         cnop    0,4
  467.  
  468. ************************************************ free argument buffer *******
  469.  
  470. FreeArgs    move.l    RDArgs(A5),D1        ;get arg_structure
  471.         beq.b    .Ready            ;branch if not set
  472.         move.l    DOSBase(A5),A6        ;set dos_base
  473.         jsr    _LVOFreeArgs(A6)    ;use dos to freeargs
  474. .Ready        rts                ;go back
  475.  
  476. *****************************************************************************
  477.  
  478.         cnop    0,4
  479.  
  480. *****************************************************************************
  481.  
  482. Error5        addq    #4,SP            ;clear return_address
  483.  
  484. Error4        move.l    D1,RCode2(A5)        ;set errorcode
  485.         pea    Quit1(pc)        ;set return_address
  486.         bra.b    Error            ;print error
  487.  
  488. *****************************************************************************
  489.  
  490.         cnop    0,4
  491.  
  492. *****************************************************************************
  493.  
  494. Error3        move.l    DObject(A5),A0            ;get diskobject
  495.         move.l    DefTool(A5),do_DefaultTool(A0)    ;restore deftool
  496.  
  497.         movea.l    ICOBase(A5),A6        ;set icon_base
  498.         jsr    _LVOFreeDiskObject(A6)    ;use icon to freediskobject
  499.  
  500. *****************************************************************************
  501.  
  502. Error2        move.l    StrEnd(A5),A2        ;restore filename
  503.         move.b    #".",(A2)        ;restore filename
  504.  
  505.         movea.l    DOSBase(A5),A6        ;set dos_base
  506.         jsr    _LVOOutput(A6)        ;search output_handle
  507.  
  508.         move.l    D0,D1            ;set output
  509.         lea    PNameBuf(A5),A2        ;get filename to print
  510.         move.l    A2,D2            ;prepare dos_fputs
  511.         jsr    _LVOFPuts(A6)        ;use dos to fputs
  512.  
  513.         movea.l    DOSBase(A5),A6        ;set dos_base
  514.         jsr    _LVOOutput(A6)        ;search output_handle
  515.         move.l    D0,D1            ;set output
  516.         moveq    #$A,D2            ;set char. to print
  517.         jsr    _LVOFPutC(A6)        ;use dos to fputc
  518.  
  519.         addq    #4,SP            ;clear return_address
  520.         pea    Next(pc)        ;set new one
  521.         bra.b    Error0            ;print error
  522.  
  523. *****************************************************************************
  524.  
  525.         cnop    0,4
  526.  
  527. *****************************************************************************
  528.  
  529. Error1        addq    #4,SP            ;clear return_address
  530.  
  531. *****************************************************************************
  532.  
  533. Error0        movea.l    DOSBase(A5),A6        ;set dos_base
  534.         jsr    _LVOIoErr(A6)        ;use dos to get ioerr
  535.         move.l    D0,RCode2(A5)        ;save as pr_result2
  536.         bne.b    Error            ;got one???
  537.  
  538.         move.l    #209,RCode2(A5)        ;hmm???...what's wrong???
  539.  
  540. *****************************************************************************
  541.  
  542. Error        move.l    RCode2(A5),D1        ;get errorcode
  543.         movea.l    DOSBase(A5),A6        ;set dos_base
  544.         jsr    _LVOSetIoErr(A6)    ;use dos to set pr_result2
  545.  
  546.         move.l    RCode2(A5),D1        ;get errorcode
  547.         moveq    #0,D2            ;prepare dos printfault
  548.  
  549.         cmp.w    #304,D1            ;check for break by user
  550.         beq.b    .PrintFault        ;branch if so
  551.  
  552.         lea    Header(pc),A2        ;get head_text 'ERROR:'
  553.         move.l    A2,D2            ;set header
  554.  
  555. .PrintFault    jsr    _LVOPrintFault(A6)    ;use dos to printfault
  556.  
  557.         moveq    #5,D0            ;set returncode rc=warn
  558.         move.l    D0,RCode1(A5)        ;save
  559.         rts                ;go back
  560.  
  561. *****************************************************************************
  562.  
  563. Template    dc.b    "FILE,TOOL/K,LIST/S,ALL/S,QUIET/S",0
  564. Header        dc.b    "ERROR",0
  565.  
  566. *****************************************************************************
  567.  
  568.         if    BSS_Section
  569.  
  570.         SECTION    SetDTool_bss,BSS
  571.  
  572.         elseif
  573.  
  574.         cnop    0,4
  575.  
  576.         endc
  577.  
  578. *****************************************************************************
  579.  
  580. DataBase    ds.b    BSS_Size
  581.  
  582.  end of source **************************************************************
  583.